package com.raycloud.erp.omll.data.entity.page;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModelProperty;

/**
 * <b>Description:</b><br>
 * 分页条件查询对象，自动封装 wrapper
 *
 * @author Abe
 * @version 1.0
 * <br><b>Date:</b> 2019/7/18 10:53
 */
public class PageQuery<T> extends Page<T> {

    private T queryData;

    public PageQuery() {
        super(1, 200);
    }

    private PageQuery(T queryData) {
        this();
        setQueryData(queryData);
    }

    @ApiModelProperty(value = "当前页码(默认为1)", example = "1", position = 10)
    public long getPageNum() {
        return getCurrent();
    }

    @ApiModelProperty(value = "每页行数(默认为200)", example = "10", position = 20)
    public long getPageSize() {
        return getSize();
    }

    @ApiModelProperty(value = "条件对象", position = 30)
    public T getQueryData() {
        return queryData;
    }

    public void setPageNum(int pageNum) {
        setCurrent(pageNum);
    }

    public void setPageSize(int pageSize) {
        setSize(pageSize);
    }

    public void setQueryData(T queryData) {
        this.queryData = queryData;
    }
}
